package com.wyzz.hr.pojo.base;

import java.io.Serializable;
import java.util.Date;

import com.wyzz.hr.pojo.Department;
import com.wyzz.hr.pojo.PositionBase;
import com.wyzz.hr.pojo.PositionBaseHist;

public abstract class BasePositionBaseHist implements Serializable {

	public BasePositionBaseHist() {
		hashCode = 0x80000000;
		initialize();
	}

	public BasePositionBaseHist(String id) {
		hashCode = 0x80000000;
		setId(id);
		initialize();
	}

	public BasePositionBaseHist(String id, PositionBase pbhiPbId,
			Integer pbhiPbStatus, Date pbhiValidFrom) {
		hashCode = 0x80000000;
		setId(id);
		setPbhiPbId(pbhiPbId);
		setPbhiPbStatus(pbhiPbStatus);
		setPbhiValidFrom(pbhiValidFrom);
		initialize();
	}

	public BasePositionBaseHist(String id, PositionBase pbhiPbId,
			Department pbhiDeptId, Integer pbhiPbStatus,
			Integer pbhiMaxEmployee, Integer pbhiInCharge, Date pbhiValidFrom,
			Date pbhiValidTo) {
		hashCode = 0x80000000;
		this.id = id;
		this.pbhiPbId = pbhiPbId;
		this.pbhiDeptId = pbhiDeptId;
		this.pbhiPbStatus = pbhiPbStatus;
		this.pbhiMaxEmployee = pbhiMaxEmployee;
		this.pbhiInCharge = pbhiInCharge;
		this.pbhiValidFrom = pbhiValidFrom;
		this.pbhiValidTo = pbhiValidTo;
		initialize();
	}

	protected void initialize() {
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
		hashCode = 0x80000000;
	}

	public Integer getPbhiInCharge() {
		return pbhiInCharge;
	}

	public void setPbhiInCharge(Integer pbhiInCharge) {
		this.pbhiInCharge = pbhiInCharge;
	}

	public Integer getPbhiMaxEmployee() {
		return pbhiMaxEmployee;
	}

	public void setPbhiMaxEmployee(Integer pbhiMaxEmployee) {
		this.pbhiMaxEmployee = pbhiMaxEmployee;
	}

	public Integer getPbhiPbStatus() {
		return pbhiPbStatus;
	}

	public void setPbhiPbStatus(Integer pbhiPbStatus) {
		this.pbhiPbStatus = pbhiPbStatus;
	}

	public Date getPbhiValidFrom() {
		return pbhiValidFrom;
	}

	public void setPbhiValidFrom(Date pbhiValidFrom) {
		this.pbhiValidFrom = pbhiValidFrom;
	}

	public Date getPbhiValidTo() {
		return pbhiValidTo;
	}

	public void setPbhiValidTo(Date pbhiValidTo) {
		this.pbhiValidTo = pbhiValidTo;
	}

	public PositionBase getPbhiPbId() {
		return pbhiPbId;
	}

	public void setPbhiPbId(PositionBase pbhiPbId) {
		this.pbhiPbId = pbhiPbId;
	}

	public Department getPbhiDeptId() {
		return pbhiDeptId;
	}

	public void setPbhiDeptId(Department pbhiDeptId) {
		this.pbhiDeptId = pbhiDeptId;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof PositionBaseHist))
			return false;
		PositionBaseHist positionBaseHist = (PositionBaseHist) obj;
		if (null == getId() || null == positionBaseHist.getId())
			return false;
		else
			return getId().equals(positionBaseHist.getId());
	}

	public int hashCode() {
		if (0x80000000 == hashCode) {
			if (null == getId())
				return super.hashCode();
			String hashStr = (new StringBuilder()).append(getClass().getName())
					.append(":").append(getId().hashCode()).toString();
			hashCode = hashStr.hashCode();
		}
		return hashCode;
	}

	public String toString() {
		return super.toString();
	}

	public static String REF = "PositionBaseHist";
	public static String PROP_PBHI_PB_STATUS = "pbhiPbStatus";
	public static String PROP_PBHI_VALID_FROM = "pbhiValidFrom";
	public static String PROP_PBHI_MAX_EMPLOYEE = "pbhiMaxEmployee";
	public static String PROP_PBHI_PB_ID = "pbhiPbId";
	public static String PROP_PBHI_VALID_TO = "pbhiValidTo";
	public static String PROP_PBHI_DEPT_ID = "pbhiDeptId";
	public static String PROP_PBHI_IN_CHARGE = "pbhiInCharge";
	public static String PROP_ID = "id";
	private int hashCode;
	private String id;
	private Integer pbhiInCharge;
	private Integer pbhiMaxEmployee;
	private Integer pbhiPbStatus;
	private Date pbhiValidFrom;
	private Date pbhiValidTo;
	private PositionBase pbhiPbId;
	private Department pbhiDeptId;

}
